<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

<head>
<title>js第2课-初识函数-04</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="这是js第2课-初识函数-04">
<script type="text/javascript">
	function setText() {
		var oTxt = document.getElementById('text1');
		oTxt.title = "改了title";
	}
</script>

</head>

<body>
	<input id="text1" type="text">
	<input type="button" value="改文字" onclick="setText()">
</body>

</html>